#include <iostream>
#include<string.h>
#include<stdio.h>
#include <algorithm>
using namespace std;
int main()
{
    char a[10005],b[10005];
    int t,i=0,j,n,m=0;
    cin>>t;
    while(t--)
    {
    a[10005]={'\0'};
    b[10005]={'\0'};
    m=0;
    cin>>a;
    n=strlen(a);
    for(j=0;j<=n;j++)
    {
       if(a[j]!=a[j+1])
        {
            b[m]=a[j];
            m++;
        }
        else if(a[j]==a[j+1])
            j++;
    }
    sort (b,b+m-1);
    if(m==0)
     cout<<" "<<endl;
     else if(m!=0)
    for(j=0;j<m;j++)
    cout<<b[j];
   cout<<endl;

    }

    return 0;
}
